Creating Result Plugins
Creating Result Plugins Result plugins are just folders with the .resultView extension that have a few html files in them. They are:
- header.html - goes before the items.
- footer.html - goes after the items.
- item.html - each result individually.
- itemspacer.html - what goes between results.
- noresult.html - if there are no results, this gets displayed.
These html files are just markup with tokens in them. Tokens have the format %word. Some built in tokens are:
- %term - The search term.
- %engine - The current search engine used to search.
- %support - The folder where all these template files are located. Use this to locate images and such.
These go in item.html
- %url - The link url for the result. There should be as many of these as results.
- %title - The title for the result. There should be as many of these as results.
- %description - The description for the result. There should be as many of these as results.
These go in any of the files
- %term - The term you searched for. There is only one of these.
- %engine - The engine you searched with. There is only one of these.
Tokens are extendible by putting new key value pairs into the dictionary "extras" in the XML Search plugin discussed here. For example:
- "%spelling" could capture the spelling correction from google and inserts it everywhere you have %spelling.
- "%numResults" could capture how many results were returned by the search.